package com.yuexunit.operationman.nbsy.module.SafeOperation.model.impl;

import com.yuexunit.operationman.nbsy.Api.Api;
import com.yuexunit.operationman.nbsy.module.SafeOperation.bean.SignBean;
import com.yuexunit.operationman.nbsy.module.SafeOperation.model.ISafeOperationSignModel;
import com.yuexunit.operationman.nbsy.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2017/7/13.
 */
public class SafeOperationSignModel implements ISafeOperationSignModel{
    Api api;

    public  Api getApiInstance() {
        if(api!=null) {
            return api;
        }else{
            api= ApiUtil.getInstance().createRetrofitApi(Api.class);
            return api;
        }
    }

    @Override
    public Observable<SignBean> getSignInfo(Map<String, String> praise) {
        api=getApiInstance();
        return api.getSignInfo(praise);
    }
}
